#include<string>
#include<boost/property_tree/ptree.hpp>
#include<boost/property_tree/xml_parser.hpp>
#include<map>

using namespace std;
using namespace boost;

int main(int argc ,char *argv[])
{
  string word;
  int count = 100000;
   vector<string> xmlvec;
  // map<string,string> xmlmap;
  // map<string,string>::itrrator map_it=xmlmap.begin();
  // while( cin>>word)
   xmlvec.push_back("2000");
 xmlvec.push_back("2001");
 xmlvec.push_back("2002");
 xmlvec.push_back("2003");



  boost::property_tree::ptree ptr;
  boost::property_tree::ptree rootNode;
  boost::property_tree::ptree timeNode;



  for(vector<string>::size_type ix=0;ix != xmlvec.size();ix++)
    {

      rootNode.add_child("time",timeNode);
      timeNode.put("time",xmlvec[ix]);
      timeNode.put("count",count);
    }

  ptr.add_child("timeline",rootNode);

  boost::property_tree::write_xml("test.xml",ptr);

  return 0;
}
